{if $session_is_teacher eq 1}
{if $sheet['step4'] neq 1}
<table>
	<tr><td>Név:</td><td>{$sheet['name']}</td></tr>
	<tr><td>Feladatok száma:</td><td>{$sheet['task_count']}</td></tr>	
	<tr><td>Elérhető max pontszám:</td><td>{$sheet['total_score']}</td></tr>	
	<tr><td>Lejárat dátuma:</td><td>{$sheet['expire']}</td></tr>	
</table>
</br>

{if $sheet['task_count']>0}
{for $i=1 to $sheet['task_count']}
<table>
	{if $sheet['sheet_type'] neq 'upload'}
	<tr><td>Feladat száma:</td><td>{$i}</td></tr>
	<tr><td>Feladat típusa:</td><td>{if $sheet['tasks'][$i]['type'] eq 1}Több választós{else}Egy választós{/if}</td></tr>	
	<tr><td>Elérhető pontszám:</td><td>{$sheet['tasks'][$i]['score']}</td></tr>	
	{/if}
	<tr><td>Kérdés:</td><td>{$sheet['tasks'][$i]['question']}</td></tr>
	<tr>
			{if $sheet['tasks'][$i]['temp_picture'] neq NULL}
			<td>
				<a href="uploads/temp/{$sheet['tasks'][$i]['temp_picture']}" target="_blank">
				<img src="uploads/temp/{$sheet['tasks'][$i]['temp_picture']}" height="204"/></a>
			</td>
			{/if}
			{if $sheet['tasks'][$i]['video_link'] neq NULL}<td>{Tools::get_video($sheet['tasks'][$i]['video_link'])}</td>{/if}
	</tr>
	
</table>
{if $sheet['sheet_type'] neq 'upload'}
<table>
	<tr><td>Válaszok:</td></tr>
	{for $j=1 to $sheet['tasks'][$i]['answer_count']}
		<tr>
			<td></td>
			<td>- {$sheet['tasks'][$i]['answers'][$j]['answer']}</td>
			<td>{if $sheet['tasks'][$i]['answers'][$j]['is_correct'] eq 1}<img src="view/images/button-check.png" alt="Helyes" />{else}<img src="view/images/button-cross.png" alt="Hibás" />{/if}</td>
		</tr>
	{/for}
	<tr><td>&nbsp;</td>
</table>
{/if}
{/for}
{/if}
<form method="post" action="?q=tasksheet/newtasksheetstep4">

<input type="submit" name="step4check" value="Feltöltés" /></td>

	{for $i=1 to $sheet['task_count']}
	{for $j=1 to $sheet['tasks'][$i]['answer_count']}
		{if {$sheet['tasks'][$i]['answers'][$j]['is_correct']} eq 1}
		<input type="hidden" name="{$i}-{$j}-is_correct" value="on" />
		{else}
		<input type="hidden" name="{$i}-{$j}-is_correct" value="off" />
		{/if}
		<input type="hidden" name="{$i}-{$j}-answer" value="{$sheet['tasks'][$i]['answers'][$j]['answer']}" />
	{/for}
{/for}

<input type="hidden" name="step3" value="{$sheet['step3']}" />
<input type="hidden" name="step3end" value="{$sheet['step3end']}" />

{for $i=1 to $sheet['task_count']}
	{if $sheet['tasks'][$i]['type'] eq 0}
		<input type="hidden" name="{$i}-type_select" value="on" />
		<input type="hidden" name="{$i}-type_checkbox" value="off" />
	{/if}
	{if $sheet['tasks'][$i]['type'] eq 1}
		<input type="hidden" name="{$i}-type_select" value="off" />
		<input type="hidden" name="{$i}-type_checkbox" value="on" />
	{/if}
	<input type="hidden" name="{$i}-answer_count" value="{$sheet['tasks'][$i]['answer_count']}" />
	<input type="hidden" name="{$i}-score" value="{$sheet['tasks'][$i]['score']}" />
	<input type="hidden" name="{$i}-question" value="{$sheet['tasks'][$i]['question']}" />
	<input type="hidden" name="{$i}-picture" value="{$sheet['tasks'][$i]['picture']}" />
	<input type="hidden" name="{$i}-temp_picture" value="{$sheet['tasks'][$i]['temp_picture']}" />
	<input type="hidden" name="{$i}-video_link" value="{$sheet['tasks'][$i]['video_link']}" />
{/for}

<input type="hidden" name="step2" value="{$sheet['step2']}" />
<input type="hidden" name="step2end" value="{$sheet['step2end']}" />

<input type="hidden" name="name" value="{$sheet['name']}" />
<input type="hidden" name="task_count" value="{$sheet['task_count']}" />
<input type="hidden" name="total_score" value="{$sheet['total_score']}" />
<input type="hidden" name="expire" value="{$sheet['expire']}" />
<input type="hidden" name="sheet_type" value="{$sheet['sheet_type']}" />
<input type="hidden" name="step1" value="{$sheet['step1']}" />
<input type="hidden" name="step1end" value="{$sheet['step1end']}" />	
</form>
{else}
<h2>SIKERES FELTÖLTÉS</h2>
{/if}
{else}
<center>
<h1>Ehhez nincs jogosultságod!</h1><br />
</center>
{/if}